﻿<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>顶部</title>
    <link href="/css/style.css" rel="stylesheet" type="text/css" />
    <script src="/js/jquery.js" language="JavaScript"></script>
    <script src="/js/vue3.js"></script>
    <script src="/js/axios.min.js"></script>
    <script type="text/javascript">
        $(function () {
            //顶部导航切换
            $(".nav li a").click(function () {
                $(".nav li a.selected").removeClass("selected")
                $(this).addClass("selected");
            })
        })	
    </script>

</head>

<body style="background:url(/images/topbg.gif) repeat-x;">

    <div class="topleft">
        <a href="main.html" target="_parent"><img src="/images/logo.png" title="系统首页" /></a>
    </div>

    <ul class="nav">
        <li><a href="/index.html" target="rightFrame" class="selected"><img src="/images/icon01.png" title="工作台" />
                <h2>工作台</h2>
            </a></li>
        <li><a href="/#" target="rightFrame"><img src="/images/icon02.png" title="模型管理" />
                <h2>模型管理</h2>
            </a></li>
        <li><a href="/#" target="rightFrame"><img src="/images/icon03.png" title="模块设计" />
                <h2>模块设计</h2>
            </a></li>
        <li><a href="/#" target="rightFrame"><img src="/images/icon04.png" title="常用工具" />
                <h2>常用工具</h2>
            </a></li>
        <li><a href="/#" target="rightFrame"><img src="/images/icon05.png" title="文件管理" />
                <h2>文件管理</h2>
            </a></li>
        <li><a href="/#" target="rightFrame"><img src="/images/icon06.png" title="系统设置" />
                <h2>系统设置</h2>
            </a></li>
    </ul>

    <div class="topright" id="box">
        <ul>
            <li><span><img src="/images/help.png" title="帮助" class="helpimg" /></span><a href="#">帮助</a></li>
            <li><a href="#">关于</a></li>
            <li><a href="/logout" target="_parent">退出</a></li>
        </ul>

        <div class="user">
            <span id="userspan">{{loginname}}</span>
            <i>消息</i>
            <b>5</b>
        </div>

    </div>
</body>

<script>
    var obj = {
        data () {
            return {
                loginname: '呦呵'
            }
        },
        mounted () {
            axios.defaults.withCredentials = true
            axios({
                method: 'post',
                url: '/blog/all/initTop',
            }).then(function (result) {
                if (result.data.code == 0) {
                    vm.loginname = result.data.data.admin
                }
            });
        }
    }
    var vm = Vue.createApp(obj).mount("#box")
</script>

</html>